import { get, _delete, uploadFile } from '@/plugins/axios'
import { URL_PREFIX } from '../index'

/* 文档检索功能 */
export const apiGetFiles = (userId, params) => get(URL_PREFIX + `/myapp/api/file/get-file/${userId}/attachments`, params)

/* 文件删除接口 */
export const apiRemoveFile = (fileId) => _delete(URL_PREFIX + '/myapp/api/file/defile/' + fileId)

/* 文件上传管理 */
export const apiUploadFile = (file, data) => uploadFile(URL_PREFIX + '/myapp/api/file/up-file', file, data, 'files')